home *** CD-ROM | disk | FTP | other *** search
/ Network Support Library / RoseWare - Network Support Library.iso / mac / nmail.sit / NetMail-OTc / card_4323.txt < prev    next >
Text File  |  1990-05-06  |  18KB  |  666 lines

  1. -- card: 4323 from stack: in
  2. -- bmap block id: 3185
  3. -- flags: 4000
  4. -- background id: 3948
  5. -- name: 
  6. ----- HyperTalk script -----
  7. on openCard
  8.   hide msg
  9.   hide card field 9
  10.   get card field id 7
  11.   put it into PathName
  12.   get card field id 19
  13.   put ":" & it after PathName
  14.   StdFile(PathName)
  15.   put PathName into card field 8
  16.   hide menubar
  17.   put the number of lines in card field id 10 into card field id 16
  18.   put (the number of cards - 2) into card field id 17
  19.   hide card button id 12
  20.   hide card button id 13
  21.   hide card field id 10
  22.   hide card field id 11
  23.   show card button 6
  24.   set the scroll of card field 1 to 0
  25.   if card field 2 is empty then
  26.     answer "Please set parameters (see instructions)" with "OK"
  27.   end if
  28.  
  29. end openCard
  30.  
  31. on idle
  32.   put the date into card field 10
  33.   put the short time into card field 11
  34.   pass idle
  35. end idle
  36.  
  37.  
  38.  
  39. -- part 1 (button)
  40. -- low flags: 00
  41. -- high flags: 2003
  42. -- rect: left=10 top=10 right=44 bottom=52
  43. -- title width / last selected line: 0
  44. -- icon id / first selected line: 20098 / 20098
  45. -- text alignment: 1
  46. -- font id: 0
  47. -- text size: 12
  48. -- style flags: 0
  49. -- line height: 16
  50. -- part name: Home
  51. ----- HyperTalk script -----
  52. on mouseUp
  53.   if the userLevel > 2 then
  54.  
  55.     domenu "Compact Stack"
  56.   end if
  57.   go home
  58. end mouseUp
  59.  
  60.  
  61.  
  62. -- part 2 (button)
  63. -- low flags: 00
  64. -- high flags: A003
  65. -- rect: left=4 top=50 right=104 bottom=57
  66. -- title width / last selected line: 0
  67. -- icon id / first selected line: 1001 / 1001
  68. -- text alignment: 1
  69. -- font id: 0
  70. -- text size: 12
  71. -- style flags: 0
  72. -- line height: 16
  73. -- part name: Get Mail
  74. ----- HyperTalk script -----
  75. on mouseUp
  76.   put "Reading mail..." into msg
  77.   set cursor to busy
  78.   show msg
  79.   wait 5 seconds
  80.   set the lockscreen to true
  81.   --get filenames from mail sub-directory
  82.   put rfiles(card field 8,"TEXT") into source
  83.   if source is empty then exit mouseUp
  84.   repeat with x=1 to the number of lines in source
  85.     if line x of source contains "LOGIN" then next repeat
  86.     put line x of source into fName
  87.     put card field 8 & ":" & fName into fileNm
  88.     put 1 into lineNr
  89.     put "Unknown" into UserID
  90.     repeat for the number of lines in card field 4
  91.       if fName contains line lineNr of card field 4 then
  92.         get line lineNr of card field 4
  93.         put it into uName
  94.         get line lineNr of card field 3
  95.         put it into UserID
  96.         exit repeat
  97.       else
  98.         add 1 to lineNr
  99.       end if
  100.     end repeat
  101.     go to first card of bkgnd id 2608
  102.     doMenu "New Card"
  103.     put uName into bkgnd field 5
  104.     put UserID into bkgnd field 2
  105.     open file fileNm
  106.     read from file fileNm until "─▒"
  107.     put it into temp
  108.     get the number of lines in temp
  109.     put it into linecount
  110.     get line 1 of temp
  111.     put it into bkgnd field 3
  112.     repeat with temp2=2 to linecount
  113.       get line temp2 of temp
  114.       put StripChar(it,"
  115.       ") & return after bkgnd field "Letter"
  116.     end repeat
  117.     close file fileNm
  118.     if fName <> "LOGIN" then
  119.       put DeleteFile(fileNm) into err
  120.     end if
  121.     go to first card
  122.     add 1 to card field 6
  123.   end repeat
  124.   --end of loop to get and read files
  125.   hide msg
  126.   play "harsichord" 75
  127.   go to first card
  128.   set cursor to arrow
  129.   set the lockscreen to false
  130. end mouseUp
  131.  
  132.  
  133.  
  134. -- part 3 (button)
  135. -- low flags: 00
  136. -- high flags: 8003
  137. -- rect: left=5 top=120 right=176 bottom=57
  138. -- title width / last selected line: 0
  139. -- icon id / first selected line: 27009 / 27009
  140. -- text alignment: 1
  141. -- font id: 0
  142. -- text size: 12
  143. -- style flags: 0
  144. -- line height: 16
  145. -- part name: View...
  146. ----- HyperTalk script -----
  147. on mouseUp
  148.   set lockscreen to true
  149.   go next card
  150.   go next card
  151.   set lockscreen to false
  152. end mouseUp
  153.  
  154.  
  155.  
  156. -- part 4 (field)
  157. -- low flags: 01
  158. -- high flags: 0007
  159. -- rect: left=61 top=202 right=300 bottom=510
  160. -- title width / last selected line: 0
  161. -- icon id / first selected line: 0 / 0
  162. -- text alignment: 0
  163. -- font id: 4
  164. -- text size: 12
  165. -- style flags: 0
  166. -- line height: 16
  167. -- part name: 
  168.  
  169.  
  170. -- part 5 (button)
  171. -- low flags: 00
  172. -- high flags: A003
  173. -- rect: left=5 top=189 right=247 bottom=60
  174. -- title width / last selected line: 0
  175. -- icon id / first selected line: 0 / 0
  176. -- text alignment: 1
  177. -- font id: 0
  178. -- text size: 12
  179. -- style flags: 0
  180. -- line height: 16
  181. -- part name: Select
  182. ----- HyperTalk script -----
  183. on mouseUp
  184.   set cursor to 4
  185.   set lockscreen to true
  186.   sort by bkgnd field 3
  187.   --put empty into card field "container"
  188.   go next card
  189.   go next card
  190.   repeat for the number of cards-1
  191.     put (line 1 of bkgnd field id 3 & return) after var1
  192.     go next card
  193.   end repeat
  194.   go to first card
  195.   put var1 into bkgnd field 1
  196.   set lockscreen to false
  197.   set cursor to 1
  198.   play "Click"
  199.   ShowDialog 7,5002,"   Select mail",geneva,9,bkgnd field 1,1
  200.   put the result into lnVar
  201.   if (lnVar is empty) or (lnVar is "Cancel") then
  202.     go to first card
  203.     set the lockscreen to false
  204.     play "harpsichord" 75
  205.     exit mouseUp
  206.   end if
  207.  
  208.   put line lnVar of bkgnd field 1 into lnSelect
  209.   set lockscreen to true
  210.   go next card
  211.   repeat for the number of cards
  212.     if bkgnd field id 3 contains lnSelect then
  213.       set lockscreen to false
  214.       exit mouseUp
  215.     else
  216.       go next card
  217.     end if
  218.   end repeat
  219.   go first card
  220. end mouseUp
  221.  
  222.  
  223.  
  224. -- part 6 (button)
  225. -- low flags: 00
  226. -- high flags: A004
  227. -- rect: left=61 top=29 right=52 bottom=210
  228. -- title width / last selected line: 0
  229. -- icon id / first selected line: 0 / 0
  230. -- text alignment: 1
  231. -- font id: 0
  232. -- text size: 12
  233. -- style flags: 0
  234. -- line height: 16
  235. -- part name: Network mail path...
  236. ----- HyperTalk script -----
  237. on mouseUp
  238.   ask "What is the path for network mail?"
  239.   put it into card field id 7
  240.   get card field id 7
  241.   put it into PathName
  242.   get card field id 19
  243.   put ":" & it after PathName
  244.   put PathName into card field 8
  245.   StdFile(PathName)
  246. end mouseUp
  247.  
  248.  
  249.  
  250. -- part 7 (field)
  251. -- low flags: 01
  252. -- high flags: 0002
  253. -- rect: left=209 top=29 right=51 bottom=510
  254. -- title width / last selected line: 0
  255. -- icon id / first selected line: 0 / 0
  256. -- text alignment: 0
  257. -- font id: 0
  258. -- text size: 12
  259. -- style flags: 0
  260. -- line height: 16
  261. -- part name: 
  262.  
  263.  
  264. -- part 9 (button)
  265. -- low flags: 00
  266. -- high flags: A004
  267. -- rect: left=201 top=132 right=157 bottom=338
  268. -- title width / last selected line: 0
  269. -- icon id / first selected line: 0 / 0
  270. -- text alignment: 1
  271. -- font id: 0
  272. -- text size: 12
  273. -- style flags: 0
  274. -- line height: 16
  275. -- part name: Set Network Users
  276. ----- HyperTalk script -----
  277. on mouseUp
  278.   hide card field 10
  279.   hide card field 11
  280.   show button id 12
  281.   show button id 13
  282.   show card field id 10
  283.   show card field id 11
  284.   hide me
  285. end mouseUp
  286.  
  287.  
  288.  
  289. -- part 10 (field)
  290. -- low flags: 80
  291. -- high flags: 0007
  292. -- rect: left=62 top=158 right=299 bottom=284
  293. -- title width / last selected line: 0
  294. -- icon id / first selected line: 0 / 0
  295. -- text alignment: 0
  296. -- font id: 3
  297. -- text size: 12
  298. -- style flags: 0
  299. -- line height: 16
  300. -- part name: Users
  301.  
  302.  
  303. -- part 11 (field)
  304. -- low flags: 80
  305. -- high flags: 0007
  306. -- rect: left=283 top=158 right=300 bottom=509
  307. -- title width / last selected line: 0
  308. -- icon id / first selected line: 0 / 0
  309. -- text alignment: 0
  310. -- font id: 3
  311. -- text size: 12
  312. -- style flags: 0
  313. -- line height: 16
  314. -- part name: IDs
  315.  
  316.  
  317. -- part 12 (button)
  318. -- low flags: 80
  319. -- high flags: A004
  320. -- rect: left=93 top=135 right=158 bottom=234
  321. -- title width / last selected line: 0
  322. -- icon id / first selected line: 0 / 0
  323. -- text alignment: 1
  324. -- font id: 0
  325. -- text size: 12
  326. -- style flags: 0
  327. -- line height: 16
  328. -- part name: Enter User Names
  329. ----- HyperTalk script -----
  330. on mouseUp
  331.   hide card button id 12
  332.   hide card button id 13
  333.   hide card field id 10
  334.   hide card field id 11
  335.   show card field 10
  336.   show card field 11
  337.   show card button 6
  338. end mouseUp
  339.  
  340.  
  341.  
  342. -- part 13 (button)
  343. -- low flags: 80
  344. -- high flags: A004
  345. -- rect: left=320 top=136 right=159 bottom=461
  346. -- title width / last selected line: 0
  347. -- icon id / first selected line: 0 / 0
  348. -- text alignment: 1
  349. -- font id: 0
  350. -- text size: 12
  351. -- style flags: 0
  352. -- line height: 16
  353. -- part name: Enter User ID's
  354. ----- HyperTalk script -----
  355. on mouseUp
  356.   hide card button id 12
  357.   hide card button id 13
  358.   hide card field id 10
  359.   hide card field id 11
  360.   show card field 10
  361.   show card field 11
  362.   show card button 6
  363. end mouseUp
  364.  
  365.  
  366.  
  367. -- part 16 (field)
  368. -- low flags: 01
  369. -- high flags: 0000
  370. -- rect: left=213 top=107 right=127 bottom=253
  371. -- title width / last selected line: 0
  372. -- icon id / first selected line: 0 / 0
  373. -- text alignment: 0
  374. -- font id: 0
  375. -- text size: 12
  376. -- style flags: 0
  377. -- line height: 16
  378. -- part name: Users
  379.  
  380.  
  381. -- part 17 (field)
  382. -- low flags: 01
  383. -- high flags: 0000
  384. -- rect: left=454 top=108 right=126 bottom=510
  385. -- title width / last selected line: 0
  386. -- icon id / first selected line: 0 / 0
  387. -- text alignment: 0
  388. -- font id: 0
  389. -- text size: 12
  390. -- style flags: 0
  391. -- line height: 16
  392. -- part name: MailNr
  393.  
  394.  
  395. -- part 18 (button)
  396. -- low flags: 00
  397. -- high flags: A004
  398. -- rect: left=61 top=51 right=74 bottom=210
  399. -- title width / last selected line: 0
  400. -- icon id / first selected line: 0 / 0
  401. -- text alignment: 1
  402. -- font id: 0
  403. -- text size: 12
  404. -- style flags: 0
  405. -- line height: 16
  406. -- part name: Your mail folder...    
  407. ----- HyperTalk script -----
  408. on mouseUp
  409.   ask "What is your folder for network mail?"
  410.   put it into card field id 19
  411.   get card field id 7
  412.   put it into PathName
  413.   get card field id 19
  414.   put ":" & it after PathName
  415.   put PathName into card field 8
  416.   StdFile(PathName)
  417. end mouseUp
  418.  
  419.  
  420.  
  421. -- part 19 (field)
  422. -- low flags: 01
  423. -- high flags: 0002
  424. -- rect: left=209 top=51 right=73 bottom=509
  425. -- title width / last selected line: 0
  426. -- icon id / first selected line: 0 / 0
  427. -- text alignment: 0
  428. -- font id: 0
  429. -- text size: 12
  430. -- style flags: 0
  431. -- line height: 16
  432. -- part name: 
  433.  
  434.  
  435. -- part 20 (field)
  436. -- low flags: 01
  437. -- high flags: 0000
  438. -- rect: left=208 top=80 right=101 bottom=510
  439. -- title width / last selected line: 0
  440. -- icon id / first selected line: 0 / 0
  441. -- text alignment: 0
  442. -- font id: 3
  443. -- text size: 10
  444. -- style flags: 0
  445. -- line height: 13
  446. -- part name: 
  447.  
  448.  
  449. -- part 21 (field)
  450. -- low flags: 81
  451. -- high flags: 0007
  452. -- rect: left=182 top=158 right=298 bottom=267
  453. -- title width / last selected line: 0
  454. -- icon id / first selected line: 0 / 0
  455. -- text alignment: 0
  456. -- font id: 3
  457. -- text size: 12
  458. -- style flags: 0
  459. -- line height: 16
  460. -- part name: 
  461.  
  462.  
  463. -- part 25 (button)
  464. -- low flags: 00
  465. -- high flags: A003
  466. -- rect: left=5 top=259 right=317 bottom=60
  467. -- title width / last selected line: 0
  468. -- icon id / first selected line: 0 / 0
  469. -- text alignment: 1
  470. -- font id: 0
  471. -- text size: 12
  472. -- style flags: 0
  473. -- line height: 16
  474. -- part name: Send...
  475. ----- HyperTalk script -----
  476. on mouseUp
  477.   set lockscreen to true
  478.   ShowDialog 7,5002,"Send mail to:",geneva,9,card field 3,1
  479.   put the result into lnVar
  480.   if lnVar is empty then exit mouseUp
  481.   get line lnVar of card field 3
  482.   put it into uName
  483.   show msg
  484.   put it into userID
  485.   put "Looking for user ID information..."
  486.   go to first card
  487.   if uName is not in card field 3 then
  488.     put "ID for this person is not present." into msg
  489.     play harpsichord "g"
  490.     set the lockscreen to false
  491.     repeat for 5000
  492.     end repeat
  493.     hide msg
  494.     exit mouseUp
  495.   end if
  496.   put 1 into lineNr
  497.   repeat for the number of lines in card field 3
  498.     if line lineNr of card field 3 = uName then
  499.       get line lineNr of card field 4
  500.       put it into uID
  501.     end if
  502.     add 1 to lineNr
  503.   end repeat
  504.   go to card 2
  505.   hide msg
  506.   doMenu "New Card"
  507.   ask "Enter subject of message:"
  508.   if it is empty then
  509.     doMenu "Delete Card"
  510.     go first card
  511.     set lockscreen to false
  512.     exit mouseUp
  513.   end if
  514.   send mouseUp to bkgnd button 6
  515.   put uName into bkgnd field 2
  516.   put uID into bkgnd field 5
  517.   put it into bkgnd field 3
  518.   set lockscreen to false
  519.   exit mouseUp
  520. end mouseUp
  521.  
  522.  
  523.  
  524. -- part 26 (field)
  525. -- low flags: 01
  526. -- high flags: 0000
  527. -- rect: left=370 top=172 right=189 bottom=502
  528. -- title width / last selected line: 0
  529. -- icon id / first selected line: 0 / 0
  530. -- text alignment: 1
  531. -- font id: 0
  532. -- text size: 12
  533. -- style flags: 2048
  534. -- line height: 16
  535. -- part name: 
  536.  
  537.  
  538. -- part 27 (field)
  539. -- low flags: 01
  540. -- high flags: 0000
  541. -- rect: left=60 top=172 right=189 bottom=192
  542. -- title width / last selected line: 0
  543. -- icon id / first selected line: 0 / 0
  544. -- text alignment: 1
  545. -- font id: 0
  546. -- text size: 12
  547. -- style flags: 2048
  548. -- line height: 16
  549. -- part name: 
  550.  
  551.  
  552. -- part contents for card part 4
  553. ----- text -----
  554. NetMail is a utility for reading network mail from the IBM side of a Novell network when using NetWare for the Macintosh and the Office Talk mail system (a shareware system available in the NOVA forum on CompuServe).  It is capable of replying to mail ONLY IF your supervisor has given you rights to create and write to files in the mail directories of other users (this prevents you from reading their mail).  If you do not have these rights, you should inform persons sending mail to you to indicate the name of the sender within the text of items sent, since this stack cannot determine the origin of mail.    
  555.  
  556. Follow the directions below for use:
  557.  
  558. 1] with the aid of your network supervisor, determine the folder (sub-directory) on your server where you mail resides;
  559.  
  560. 2] select the "Network mail path..." button at the top of this card and CAREFULLY enter the path for the network mail system using the Macintosh convention (colons rather than back-slashes), for example:
  561.  
  562.                SERVER_1:MAIL
  563.  
  564. Please note that this is the MAIN directory for the mail service, not the directory assigned to a specific person.  Also, note that there is not a colon (:) following the last sub-directory (folder) name;
  565.  
  566. 3] Click on the "Your mail folder..." button to enter the name of the sub-directory (folder) which is your personal mail area (the network supervisor can supply this);
  567.  
  568. 4] Place this stack in a location where it can be accessed easily (usually in the same folder as Hypercard); and,
  569.  
  570. 5] If your supervisor has given you rights in other persons mail areas as described above, set up the other users by selecting the "Set Network Users" button above.  This will bring up two text entry areas for entering the user name and corresponding sub-directory for their mail.  When entering this information, be absolutely certain that each entry (for both parameters) is on a separate line AND that the name and sub-directory entries are on the same lines (i.e., if you need to scroll one field to enter more information, scroll exactly the same number of lines in the other field, and enter the names and sub-directory information directly across from each other).  Clicking on the "Enter User Names" or "Enter User ID's" buttons will close this area.
  571.  
  572. Daily use of the utility involves two steps:
  573.  
  574. 1] after starting this stack, click on the "Get Mail" button (on the left side of this card) (this causes Hypercard to read AND DELETE your mail as you select each file shown);
  575.  
  576. [WARNING:  Do NOT select the file called "LOGIN".  While the system is designed to protect against deletion of this file, it's still not a good idea to select it.]
  577.  
  578. 2] select the "View..." button below to read each item of mail.
  579.  
  580. The "Select" button will give you a list of the mail currently in the stack listed according to the subject rather than the sender.  If you want to keep your mail here 
  581. (for storage), this listing facility will come in handy.
  582.  
  583. The "Kill" button on the individual mail cards will delete that mail from this stack (not from the server, since the mail was deleted at the time it was added to the stack).
  584.  
  585. At the bottom of each mail screen is a "Write/See Reply" button which will open a field in which you can reply to the item.  Compose your reply in that area.  If you have been given rights as previously mentioned (in other mail areas), you can then click on the "Send to:" button at the top of the screen in order to send the mail.  Users will not be notified immediately of the mail they have received, but they will find it there when running the mail application.
  586. (This has not been tested with all mail systems capable of running on the Novell network.)  Please note that, when composing a reply, you must put a hard return (hit the return key) at the end of each line.  Do NOT rely upon the word-wrapping within Hypercard.
  587.  
  588. The "Send..." button on the initial card will allow you to compose and send new mail to a user (if you have been granted the necessary rights to their mail directories and have entered the information described for "Set Network Users").  Selecting this button will produce a list of users from which to select your "target" for sending the mail.  It will then ask you for the subject of your mail.  After supplying this information, you will be brought to a new mail card.  Here you can enter your message in the lower text entry field and proceed just as if you were writing a reply as described above.  When you have finished composing your message, click on the "Send to" button.  Office Talk will recognize this as new mail when that program is run by users on the PC side of the network.
  589.  
  590. NOTE:  This stack is free.  If you use it, I would appreciate E-mail on CompuServe notifying me of that fact and describing any problems you may have had. (E-mail address is shown in the lower right of this card.)
  591.  
  592.  
  593. -- part contents for card part 16
  594. ----- text -----
  595. 1
  596.  
  597. -- part contents for card part 17
  598. ----- text -----
  599. 0
  600.  
  601. -- part contents for card part 20
  602. ----- text -----
  603. Hard Disk:Hypercard:Projects:MailFolder:11006D
  604.  
  605. -- part contents for background part 1
  606. ----- text -----
  607. Book entitled: Service America
  608. Book Search
  609. Communication with my BBS
  610. computers
  611. Directors meeting
  612. Federal Express
  613. Fire Drill
  614. Harry Watts proposal
  615. How could I make a mistake like that?
  616. Jessica Brom
  617. Jim King
  618. Junk
  619. Junk
  620. Lunch
  621. Meeting Date Change
  622. New city council member from our ward
  623. Nuncio tuis gaudium magnum
  624. Phone
  625. Phonebook
  626. Phonebook
  627. Self-review report to Dennis
  628. Senior Staff Agenda
  629. Senior Staff agenda for February 15
  630. Senior Staff Meeting 3/15/90
  631. seniorstaff
  632. The Pimlott's
  633. The Schild Family in Newton, Iowa
  634. The Village Ground Breaking
  635. The Village Groundbreaking
  636. The Village Groundbreaking
  637. Village and Park Centre Mail
  638. Village Marketing Folder
  639.  
  640.  
  641.  
  642. -- part contents for card part 26
  643. ----- text -----
  644. 5/6/90
  645.  
  646. -- part contents for card part 27
  647. ----- text -----
  648. 8:36 AM
  649.  
  650. -- part contents for card part 7
  651. ----- text -----
  652. Hard Disk:Hypercard:Projects:MailFolder
  653.  
  654. -- part contents for card part 19
  655. ----- text -----
  656. 11006D
  657.  
  658. -- part contents for card part 10
  659. ----- text -----
  660.  
  661.  
  662.  
  663. -- part contents for card part 11
  664. ----- text -----
  665.  
  666.